import { createWebHashHistory, createRouter, } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
import installGuard from './guard'
import system from './module/system'
import flow from './module/flow'
const routes:Array<RouteRecordRaw> = [
{
  path: '/',
  name: 'Layout',
  component: () => import('@/Layout/index.vue'),
  children: [
    {
      path: '/home',
      name: 'Home',
      component: () => import('@/views/home/index.vue'),
    },
    ...system,
   ...flow,
  ],
},

{
  path: '/login',
  name: 'Login',
  component: () => import('@/views/login/index.vue'),
 
},

]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})


installGuard(router)


export default router



